<?php

require 'basehandle.php';
require '../dao/userdao.php';

class Shopequip implements basehandle{
	public function dohandle(){
		$userid=$_POST['userid'];
		$riderid=$_POST['riderid'];
		$coin=$_POST['ucoin'];
		$rname=$_POST['rname'];
		$dao=new userdao();
 		$rs=$dao->gouequip($userid,$riderid);
 		$rs1=$dao->overcoin($coin,$userid);
 		$rs2=$dao->dinggouequip($userid,$rname);
		if(!empty($rs) && !empty($rs1) && !empty($rs2)){
			$info=array("rs"=>"success");
		}
		else{
			$info=array("rs"=>"error","errorinf"=>"加载失败");
		}
		echo json_encode($info);
	}
	
}  
?>